Sending URL Preview Bundles (MSC 4095)#34150
Open
Siriusmart wants to merge 31 commits into
Open
Conversation
While fetching all link previews in the text message.
Half-Shot
requested changes
Jul 6, 2026
Half-Shot
left a comment
Member
There was a problem hiding this comment.
On the right track, given you a few bits to think about. Primarily:
- For the moment we want this to work with one preview, and a future PR can adapt us to handle multiple.
- Moving the VM outside the context of the composer preview component is fine, but we should also clean up the usages of it.
5 tasks
Half-Shot
requested changes
Jul 7, 2026
Half-Shot
left a comment
Member
There was a problem hiding this comment.
Getting there, have some bold suggestions.
Half-Shot
reviewed
Jul 9, 2026
| <div className="mx_MessageComposer_wrapper"> | ||
| <MessageComposerUrlPreviewWrapper | ||
| content={this.state.urlPreviewComposerContent} | ||
| content={this.props.urlPreviewVm.getSnapshot().content} |
Member
There was a problem hiding this comment.
Prefer to use const { content} = useViewModel(vm) inside the component, as this won't be reactive.
Half-Shot
requested changes
Jul 9, 2026
Half-Shot
left a comment
Member
There was a problem hiding this comment.
Looking really good! Once the tests are complete I think this is ready for a spin.
| private autoCompletePartCount = 0; | ||
| private transformCallback: TransformCallback | null = null; | ||
|
|
||
| public get contentPlainText(): string { |
Member
There was a problem hiding this comment.
Smart, I'd add a docstring to explain what this does (grabs the parts from the model, only includes Plain entries, and joins them. We're intentionally skipping mentions since previews don't care about them, but other callers might be surprised.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
public/exportedsymbols have accurate TSDoc documentation.